// @flow
import React from 'react'

type Props = {
  location: Object
}

class Ifram extends React.PureComponent {
  props: Props
  render () {
    let url
    if (this.props.location) {
      const rowUrl = this.props.location.pathname
      url = rowUrl.split('/').splice(2).join('/')
    }
    return (
      <iframe src={url} style={{ width: 'calc(100% - 300px)', height: 'calc(100% - 5px)' }} />
    )
  }
}

export default Ifram
